package com.tradesolver;

import java.util.Date;

import javax.persistence.Id;

import com.google.appengine.repackaged.com.google.common.base.Objects;
import com.googlecode.objectify.annotation.Unindexed;

public class TickerStat {
  @Id
  String ticker;
  
  @Unindexed
  Date lastDate;
  
  @Unindexed
  float lastOpen;

  @Unindexed
  float lastHigh;

  @Unindexed
  float lastLow;

  @Unindexed
  float lastClose;

  @Unindexed
  float lastVolume;

  @Unindexed
  Date prevDate;
  
  @Unindexed
  float prevOpen;

  @Unindexed
  float prevHigh;

  @Unindexed
  float prevLow;

  @Unindexed
  float prevClose;

  @Unindexed
  float prevVolume;

  @Unindexed
  float allHigh;

  @Unindexed
  Date allHighDate;
  
  @Unindexed
  float allLow;
  
  @Unindexed
  Date allLowDate;
  
  
  Date updateDate;

  private TickerStat() {
  }

  public TickerStat(String ticker) {
    super();
    this.ticker = ticker;
  }

  @Override
  public String toString() {
    return Objects.toStringHelper(this).add("ticker", ticker).add("lastDate", lastDate).add("lastClose", lastClose)
        .add("prevDate", prevDate).add("prevClose", prevClose).add("updateDate", updateDate).toString();
  }
}
